package com.xdtech.play.service;

import java.util.List;

import com.xdtech.common.service.IBaseService;
import com.xdtech.play.model.PlayMember;
import com.xdtech.play.model.PlayTradeRecord;
import com.xdtech.play.vo.PlayTradeRecordItem;
import com.xdtech.web.model.ResultMessage;

/**
 * 
 * @author max.zheng
 * @create 2016-05-08 23:42:57
 * @since 1.0
 * @see
 */
public interface PlayTradeRecordService extends IBaseService<PlayTradeRecord>{

	/**
	 * 保存更新信息
	 * @author max.zheng
	 * @create 2016-05-08 23:42:57
	 * @modified by
	 * @param item
	 * @return
	 */
	boolean saveOrUpdatePlayTradeRecord(PlayTradeRecordItem item);

	/**
	 * 加载记录信息
	 * @author max.zheng
	 * @create 2016-05-08 23:42:57
	 * @modified by
	 * @param newId
	 * @return
	 */
	PlayTradeRecordItem loadPlayTradeRecordItem(Long playTradeRecordId);

	/**
	 * 根据id号删除记录信息
	 * @author max.zheng
	 * @create 2016-05-08 23:42:57
	 * @modified by
	 * @param id
	 * @return
	 */
	boolean deletePlayTradeRecordInfo(long id);

	/**
	 * 
	 * @author max.zheng
	 * @create 2016-05-08 23:42:57
	 * @modified by
	 * @param playTradeRecordIds
	 */
	boolean deletePlayTradeRecordInfo(List<Long> playTradeRecordIds);
	
	/**
	 * 加载vo列表条目
	 * @author max.zheng
	 * @create 2016-05-08 23:42:57
	 * @modified by
	 * @return
	 */
	List<PlayTradeRecordItem> loadItems();

	/**
	 * 充值
	 * @param item
	 * @return
	 */
	ResultMessage inPlayAccount(PlayTradeRecordItem item);

	/**
	 * 提取
	 * @param item
	 * @return
	 */
	ResultMessage outPlayAccount(PlayTradeRecordItem item);

	/**
	 * 创建一条开庄交易记录
	 * @param member
	 * @param account
	 */
	void createPlayStartRecord(PlayMember member, Integer account,String operator);
}
